package com.vogue.supplymall.entmanagement.domain.model;

import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.format.annotation.DateTimeFormat;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;

import java.io.Serializable;
import java.util.Date;

/**
 * The type Licence apply detail.
 */
@Entity
@Table(name = "licence_apply_detail")
public class LicenceApplyDetail extends BaseEntity implements Serializable{

	/**
	 * 
	 */
	private static final long serialVersionUID = -4897250705813444874L;
	/**
	 * 门店id
	 */
	private Long shopid;
	/**
	 * 主申请记录id
	 */
	private Long applyid;
	/**
	 * 证照类型id
	 */
	private Long licencetypeid;
	/**
	 * 证照图片上传地址
	 */
	private String url;
	/**
	 * 申请状态 0：待审核 1：审核通过 2：审核未通过 3：过期
	 */
	private int applystatue;

	@DateTimeFormat(
			pattern = "yyyy-MM-dd HH:mm:ss"
	)
	@JsonFormat(
			pattern = "yyyy-MM-dd HH:mm:ss"
	)
	@Column(
			updatable = true,
			columnDefinition = "DATETIME NULL COMMENT'有效期开始日期'"
	)
	private Date begindate = new Date();

	@DateTimeFormat(
			pattern = "yyyy-MM-dd HH:mm:ss"
	)
	@JsonFormat(
			pattern = "yyyy-MM-dd HH:mm:ss"
	)
	@Column(
			updatable = true,
			columnDefinition = "DATETIME NULL COMMENT'有效期结束日期'"
	)
	private Date enddate = new Date();

    /**
     * 对应的供应链系统中的organid
     */
    private String matchid;
    
	public Long getShopid() {
		return shopid;
	}

	public void setShopid(Long shopid) {
		this.shopid = shopid;
	}

	public Long getApplyid() {
		return applyid;
	}

	public void setApplyid(Long applyid) {
		this.applyid = applyid;
	}

	public Long getLicencetypeid() {
		return licencetypeid;
	}

	public void setLicencetypeid(Long licencetypeid) {
		this.licencetypeid = licencetypeid;
	}

	public String getUrl() {
		return url;
	}

	public void setUrl(String url) {
		this.url = url;
	}

	public Date getBegindate() {
		return begindate;
	}

	public void setBegindate(Date begindate) {
		this.begindate = begindate;
	}

	public Date getEnddate() {
		return enddate;
	}

	public void setEnddate(Date enddate) {
		this.enddate = enddate;
	}

	public int getApplystatue() {
		return applystatue;
	}

	public void setApplystatue(int applystatue) {
		this.applystatue = applystatue;
	}
	
	public String getMatchid() {
        return matchid;
    }

    public void setMatchid(String matchid) {
        this.matchid = matchid;
    }
}
